﻿<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.Center" Gap="3rem" Wrap="FlexWrap.Wrap" class="rz-p-12">
    <RadzenSplitButton IsBusy=@busy Click=@OnBusyClick Text="Save">
        <ChildContent>
            <RadzenSplitButtonItem Text="Item1" Value="1" />
            <RadzenSplitButtonItem Text="Item2" Value="2" />
        </ChildContent>
    </RadzenSplitButton>
    <RadzenSplitButton Icon="save" BusyText="Saving ..." IsBusy=@busy Click=@OnBusyClick Text="Save">
        <ChildContent>
            <RadzenSplitButtonItem Text="Item1" Value="1" />
            <RadzenSplitButtonItem Text="Item2" Value="2" />
        </ChildContent>
    </RadzenSplitButton>
</RadzenStack>

@code {
    bool busy;

    async Task OnBusyClick()
    {
        busy = true;
        await Task.Delay(2000);
        busy = false;
    }
}
